package leetcode;

/**
 * @author yuhe
 * @version 1.0
 * @date 2020/6/8 18:03
 */
public class Test {
    public static void main(String[] args) {
        Solution solution= new Solution();
        solution.twoSum(new int[]{3,2,4,5,7},9);
    }
}
class Solution {
    public int[] twoSum(int[] nums, int target) {
        int[] result = new int[2];
        for(int i=0;i<nums.length;i++){
            for (int j=0;j<nums.length;j++){
                if (nums[i]+nums[j]==target){
                    result[0] = nums[i];
                    result[1] = nums[j];
                    System.out.println("mun:i="+nums[i]);
                    System.out.println("num:j="+nums[j]);
                }
            }
        }
        return result;
    }
}
